#include <stdio.h>
struct species
{
    char *name;
    int kinds;
};

struct fish
{
    char *name;
    int age;
    struct species breed;
};
void main(void)
{

    // 写法一
    // struct fish shark = {"shark", 9, {"Selachimorpha", 500}};

    // 写法二
    // struct species myBreed = {"Selachimorpha", 500};
    // struct fish shark = {"shark", 9, myBreed};

    // 写法三
    // struct fish shark = {
    //     .name = "shark",
    //     .age = 9,
    //     .breed = {"Selachimorpha", 500}};

    // 写法四
    struct fish shark = {
        .name = "shark",
        .age = 9,
        .breed.name = "Selachimorpha",
        .breed.kinds = 500};

    printf("Shark's species is %s\n", shark.breed.name);
    shark.breed.name = "changed";
    printf("Shark's species is %s\n", shark.breed.name);
}